<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="../lib/bootstrap-3.3.5-dist/css/bootstrap.min.css">
  <script src="../lib/bootstrap-3.3.5-dist/js/jquery-1.11.3.js"></script>
  <script src="../lib/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
  <link rel="stylesheet" href="../css/caidanlan.css">
  <link rel="stylesheet" href="../font/iconfont.css">
  <link rel="stylesheet" href="../css/shouye.css">
  <link rel="stylesheet" href="../css/jieyueguanli.css">
  <script src="../javaScript/data_management.js"></script>
  <script src="../javaScript/kadaoqi.js"></script>
  <script src="../javaScript/quanxianpanduan.js"></script>
  <script src="../javaScript/utl.js"></script>
</head>

<body>
  <div class="container-fulid">
    <div class="row shouhang">
      <span class="iconfont icon-ziliaoku"></span>
      <p>图书馆后台管理系统</p>
      <div id='yonghu'>
      </div>
    </div>
    <div class="row">
      <div class="col-md-2 caidan">
        <a href="../html/jueseguanli.html">
          <p> 角色管理</p>
        </a>
        <a href="../html/guanliyuanguanli.html">
          <p>管理员管理</p>
        </a>
        <a href="./quanxianguanli.html">
          <p>权限管理</p>
        </a>
        <a href="../html/ReaderUser.html">
          <p>读者用户</p>
        </a>
        <a href="../html/duzhejuese.html">
          <p>读者角色</p>
        </a>
        <a href="../html/yuedu.html">
          <p>借阅查询</p>
        </a>
        <a href="../html/jieyueguanli.html">
          <p>借阅管理</p>
        </a>
        <a href="../html/book-management.html">
          <p>书刊管理</p>
        </a>
        <a href="../html/guancangdizhi.html">
          <p>馆藏地址管理</p>
        </a>
        <a href="../html/guancangfenlei.html">
          <p>馆藏分类管理</p>
        </a>
        <a href="../html/cengjiaLabel.html">
          <p>层架标签配置</p>
        </a>
        <a href="../html/fenguanshezhi.html">
          <p>分馆配置</p>
        </a>
        <a href="../html/book_inventory.html">
          <p>图书盘点</p>
        </a>
        <a href="../html/dindanguanli.html">
          <p>订单管理</p>
        </a>
        <a href="../html/tushuguanshezi.html">
          <p>图书馆设置</p>
        </a>
      </div>
      <div class="col-md-10 youbian">
        <p class="pp">首页 &nbsp;>&nbsp;&nbsp;借阅管理</p>
        <div class="row">
          <div class="col-md-9"></div>
          <div class="col-md-3" id="cha">
            <button>重置</button>
          </div>
        </div>
        <div class="row center">
          <div class="col-md-4">
            <p>读者信息</p>
            <div class="bianju">
              <div class="chaxun">
                <input type="text" placeholder="请输入身份证/卡号" onfocus="this.placeholder=''"
                  onblur="this.placeholder='请输入身份证/卡号'">
                <button class="sen" onclick="charen()">查询</button>
                <button id="zongb">读身份证</button>
                <button>读卡</button>
              </div>
              <div id="im1"><img src="../images/bookpicture/25.jpg" alt=""></div>

              <div class="duzhesuru dip">
                <input type="text" disabled placeholder="读者卡号:" onfocus="this.placeholder=''"
                  onblur="this.placeholder='读者卡号:'">
                <input type="text" disabled placeholder="姓名:" onfocus="this.placeholder=''"
                  onblur="this.placeholder='姓名:'">
                <input type="text" disabled placeholder="手机号:" onfocus="this.placeholder=''"
                  onblur="this.placeholder='手机号:'">
                <input type="text" disabled placeholder="过期时间:" onfocus="this.placeholder=''"
                  onblur="this.placeholder='过期时间:'">
                <input type="text" disabled placeholder="读者类型:" onfocus="this.placeholder=''"
                  onblur="this.placeholder='读者类型:'">
                <input type="text" disabled placeholder="可借书籍:" onfocus="this.placeholder=''"
                  onblur="this.placeholder='可借书籍:'">
                <input type="text" disabled placeholder="用户状态:" onfocus="this.placeholder=''"
                  onblur="this.placeholder='用户状态:'">
                <input type="text" disabled placeholder="已借数量:" onfocus="this.placeholder=''"
                  onblur="this.placeholder='已借数量:'">
              </div>
            </div>

          </div>
          <div class="col-md-7">
            <p>书刊信息</p>
            <div class="bianju zuihou">
              <div class="chaxun">
                <input type="text" placeholder=" 请输入书籍条码编号" onfocus="this.placeholder=''"
                  onblur="this.placeholder=' 请输入书籍条码编号'">
                <button class="sen" onclick="chashu()">查询</button>
              </div>
              <div class="row">
                <div class="col-md-3">
                  <div id="im2"><img src="../images/bookpicture/4792.jpg" alt=""></div>
                </div>
                <div class="col-md-9 duzhesuru dip1">
                  <input type="text" disabled placeholder="书籍名称:" onfocus="this.placeholder=''"
                    onblur="this.placeholder='书籍名称:'">
                  <input type="text" disabled placeholder="标识号:" onfocus="this.placeholder=''"
                    onblur="this.placeholder='标识号:'">
                  <input type="text" disabled placeholder="馆藏类型" onfocus="this.placeholder=''"
                    onblur="this.placeholder='馆藏类型'">
                  <input type="text" disabled placeholder="馆藏地址:" onfocus="this.placeholder=''"
                    onblur="this.placeholder='馆藏地址:'">
                  <input type="text" disabled placeholder="分类编号:" onfocus="this.placeholder=''"
                    onblur="this.placeholder='分类编号:'">
                  <input type="text" disabled placeholder="图书状态:无" onfocus="this.placeholder=''"
                    onblur="this.placeholder='图书状态:无'">
                </div>
              </div>
              <div>

              </div>
            </div>
            <div class="row xc4">
              <div class="col-md-4" onclick="">借阅</div>
              <div class="col-md-4">续借</div>
              <div class="col-md-4">归还</div>
            </div>
            <div>
              <table>
                <thead>
                  <tr>
                    <td>借阅状态</td>
                    <td>书籍条码</td>
                    <td>书籍名称</td>
                    <td>借阅日期</td>
                    <td>应还日期</td>
                    <td>续借次数</td>
                    <td>归还日期</td>
                  </tr>
                </thead>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script>
    isLogin()
    let guanliname = glqx('借阅管理')
    yonghu()


    function charen() {
      $(".dip>input").val("")
      if (czqx(guanliname, '查询')) {
        return
      }
      $.each(duzhezhen, (index, item) => {
        if (item.duzhekahao == $(".chaxun>input").eq(0).val()) {
          $(".duzhesuru>input").eq(0).val("读者卡号:" + item.duzhekahao)
          $(".duzhesuru>input").eq(1).val("姓名:" + item.xingmin)
          $(".duzhesuru>input").eq(4).val("读者类型:" + item.quanxian)
          $(".duzhesuru>input").eq(6).val("用户状态:" + item.duzhezhuangtai)

          $("#im1>img").attr("src", item.user_img)
          $.each(ren, (index, item1) => {
            if (item.xingmin == item1.xingmin) {
              $(".duzhesuru>input").eq(2).val("手机号:" + item1.shoujihaoma)
              jisuanshijian()
              $(".duzhesuru>input").eq(3).val('过期时间:' + item.kadaoqi)
              jisuansuji()
              $(".duzhesuru>input").eq(5).val('可借书籍:' + kejiecesu + "本")
              $(".duzhesuru>input").eq(7).val('已借数量:' + yijiecisu + "本")
            }
          })
        }
      })
    }
    function chashu() {
      $(".dip1>input").val("")
      if (czqx(guanliname, '查询')) {
        return
      }
      $.each(Newbook, (index, item) => {
        if (item.ISBN == $(".chaxun>input").eq(1).val()) {
          $("#im2>img").attr("src", item.book_src)
          $(".duzhesuru>input").eq(8).val('书籍名称:' + item.book_name)
          $(".duzhesuru>input").eq(9).val("标识号:" + item.index_number)
          $(".duzhesuru>input").eq(10).val("馆藏类型:" + item.book_class)
          $(".duzhesuru>input").eq(11).val("馆藏地址:" + item.chubanSite)
          $(".duzhesuru>input").eq(12).val("分类编号:" + item.class_num)
          $.each(jieshuarr, (index, item1) => {
            if (item.book_name == item1.shujiname) {
              $(".duzhesuru>input").eq(13).val("图书状态:" + item1.zhuangtai)
              //     $(".duzhesuru>input").eq(3).val('过期时间:' + item.kadaoqi)
            }
          })
        }
      })
    }
  </script>
</body>

</html>